﻿<UserControl x:Class="XSemmel.Editor.EditorFrame"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="220" d:DesignWidth="600" 
             xmlns:editor="clr-namespace:XSemmel.Editor"
             xmlns:schema="clr-namespace:XSemmel.Schema"
             xmlns:XPath="clr-namespace:XSemmel.XPath" 
             xmlns:WebBrowser="clr-namespace:XSemmel.WebBrowser" 
             xmlns:TreeView="clr-namespace:XSemmel.TreeView">
    <Grid>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="3*" MinHeight="150" />
            <RowDefinition Height="4"/>
            <RowDefinition Height="1*" MinHeight="50"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" MinWidth="100" />
            <ColumnDefinition Width="4"/>
            <ColumnDefinition Width="4*" MinWidth="400"/>
        </Grid.ColumnDefinitions>

        <TabControl Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" TabStripPlacement="Bottom" Margin="5 4 3 5" Background="Transparent"
                    SelectionChanged="Selector_OnSelectionChanged">
            <TabItem Header="Tree" x:Name="_editorTreeDockable">
                <TreeView:EditorTree x:Name="_editorTree" x:FieldModifier="internal" />
            </TabItem>
            <TabItem Header="XPath Query" x:Name="_xPathQueryDockable">
                <XPath:XPathQueries x:Name="_xPathQuery" />
            </TabItem>
            <TabItem Header="Search'n'Replace" x:Name="_xPathSearchAndReplaceDockable">
                <XPath:XPathSearchAndReplace x:Name="_xPathSearchAndReplace" x:FieldModifier="private" />
            </TabItem>
        </TabControl>

        <GridSplitter Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" />

        <TabControl Grid.Column="2" Grid.Row="2" TabStripPlacement="Bottom" Margin="2 2 5 5" Background="Transparent">
            <TabItem x:Name="_editorValidationDockable" x:FieldModifier="private" Header="Validation">
                <schema:EditorValidation x:Name="_editorValidation" x:FieldModifier="private" />
            </TabItem>

            <TabItem x:Name="_xsdPropertiesDockable" x:FieldModifier="private" Header="Xsd Properties">
                <ListBox x:Name="_lstXsdSelectedProperties" x:FieldModifier="internal" Background="{x:Static SystemColors.InfoBrush}" />
            </TabItem>

            <TabItem x:Name="_fragmentDockable" x:FieldModifier="private" Header="Fragment">
                <editor:FragmentView x:Name="_fragment" x:FieldModifier="private"/>
            </TabItem>

            <TabItem x:Name="_schemaInfoDockable" x:FieldModifier="private" Header="Schema Info">
                <schema:SchemaInfoView x:Name="_schemaInfo" x:FieldModifier="private"/>
            </TabItem>
        </TabControl>

        <GridSplitter Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" />

        <TabControl Grid.Column="2" Grid.Row="0" TabStripPlacement="Bottom" Margin="2 4 5 3" Background="Transparent">
            <TabItem x:Name="_xmlEditorDockable" x:FieldModifier="private" Header="Editor">
                <editor:XmlEditor Grid.Row="0" x:Name="_xmlEditor" x:FieldModifier="private" />
            </TabItem>

            <TabItem x:Name="_gridViewDockable" x:FieldModifier="private" Header="Grid" >
                <editor:XmlGridView x:Name="_gridView" x:FieldModifier="private" />
            </TabItem>

            <TabItem x:Name="_xsdVisualizerDockable" x:FieldModifier="internal" Header="Xsd Visualizer">
                <schema:XsdVisualizer x:Name="_xsdVisualizer" x:FieldModifier="internal" />
            </TabItem>

            <TabItem x:Name="_webBrowserDockable" x:FieldModifier="private" Header="Web Browser">
                <WebBrowser:WebBrowserView x:Name="_webBrowser" x:FieldModifier="private" />
            </TabItem>
        </TabControl>


    </Grid>
</UserControl>
